package Model.Draw;

/**
 *
 * @author José Luz
 */
public class Point {

    private Coordinate x;
    private Coordinate y;
    
    public Point(Coordinate x, Coordinate y){
        this.x = x;
        this.y = y;
    }
    
    @Override
    public String toString() {
        return "Ponto x= " + x.getCoordinate() + " e y= " + y.getCoordinate() + "}";
    }
    
    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final Point other = (Point) obj;
        if (this.x != other.x && (this.x == null || !this.x.equals(other.x))) {
            return false;
        }
        if (this.y != other.y && (this.y == null || !this.y.equals(other.y))) {
            return false;
        }
        return true;
    }

    @Override
    public int hashCode() {
        int hash = 7;
        return hash;
    }

    /**
     * @return the x coordinate
     */
    public Coordinate getX() {
        return x;
    }

    /**
     * @param set coordinate x
     */
    public void setX(Coordinate x) {
        this.x = x;
    }

    /**
     * @return the y coordinate
     */
    public Coordinate getY() {
        return y;
    }

    /**
     * @param set y coordinate
     */
    public void setY(Coordinate y) {
        this.y = y;
    }
}
